package com.fordmotor.config;

import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@Data
@Component
public class GaodeConfig {
    public static String appKey;

    public static int maxInvokeCounts;//每个服务每天最大调用次数

    public static String regeo;//高德地址反查接口

    public static String geo;//高德地址查询接口

    public static String keyWordSearch;//高德地图关键字查询

    public static String idSearch;//兴趣搜索

    public static Double earthLongRadius;

    public static String regeoKey;

    public static String sinopec;

    public static boolean citylimit;

    public static String aroundSearch;

    public static Integer radius;

    public static String ford;

    @Value("${ford.lbsamap.service.key}")
    public void setAppKey(String appKey) {
        GaodeConfig.appKey = appKey;
    }
    @Value("${ford.lbsamap.service.maxInvokeCounts}")
    public void setMaxInvokeCounts(int maxInvokeCounts) {
        GaodeConfig.maxInvokeCounts = maxInvokeCounts;
    }
    @Value("${ford.lbsamap.service.regeo}")
    public void setRegeo(String regeo) {
        GaodeConfig.regeo = regeo;
    }
    @Value("${ford.lbsamap.service.keyWordSearch}")
    public void setKeyWordSearch(String keyWordSearch) {
        GaodeConfig.keyWordSearch = keyWordSearch;
    }
    @Value("${ford.lbsamap.service.earthLongRadius}")
    public void setEarthLongRadius(Double earthLongRadius) {
        GaodeConfig.earthLongRadius = earthLongRadius;
    }
    @Value("${ford.lbsamap.service.regeoKey}")
    public void setRegeoKey(String regeoKey) {
        GaodeConfig.regeoKey = regeoKey;
    }
    @Value("${ford.lbsamap.service.geo}")
    public void setGeo(String geo) {
        GaodeConfig.geo = geo;
    }

    @Value("${ford.lbsamap.service.sinopec}")
    public void setSinopec(String sinopec) {
        GaodeConfig.sinopec = sinopec;
    }
    @Value("${ford.lbsamap.service.citylimit}")
    public void setCitylimit(boolean citylimit) {
        GaodeConfig.citylimit = citylimit;
    }
    @Value("${ford.lbsamap.service.aroundSearch}")
    public void setAroundSearch(String aroundSearch) {
        GaodeConfig.aroundSearch = aroundSearch;
    }
    @Value("${ford.lbsamap.service.radius}")
    public void setRadius(Integer radius) {
        GaodeConfig.radius = radius;
    }
    @Value("${ford.lbsamap.service.ford}")
    public void setFord(String ford) {
        GaodeConfig.ford = ford;
    }
    @Value("${ford.lbsamap.service.idSearch}")
    public void setIdSearch(String idSearch) {
        GaodeConfig.idSearch = idSearch;
    }
}
